'''
@author: zhangkai
@license: (C) Copyright 2017-2023
@contact: jeffcobile@gmail.com
@Software : PyCharm
@file: model_zoo.py
@time: 2020-05-29 11:19:38
@desc: 
'''
from jjzhk.register import Registry


MODEL_ZOO = Registry("MODEL")


def get_model(cfg):
    """
    Built the whole model, defined by `cfg.MODEL.META_ARCHITECTURE`.
    """
    model_name = cfg.MODEL.NAME
    model = MODEL_ZOO.get(model_name)(cfg)
    # load_model_pretrain(cfg, model)
    return model